package com.zombie.logic.object.ai.action;

import com.zombie.logic.object.GameObject;
import com.zombie.logic.object.LiveObject;
import com.zombie.logic.object.ai.AI;

public class ActionFlee extends Action {

	public GameObject target;
	
	public ActionFlee(GameObject damager) {
		type = ActionType.FLEE;
		target = damager;
	}

	public void checkCondition(AI ai, LiveObject owner){
		super.checkCondition(ai, owner);
		if (target.position.dst(owner.position) > 400)
			done = true;
	}
}
